{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# medication\n",
    "\n",
    "The medications table reflects the active medication orders for patients. These are orders but do not necessarily reflect administration to the patient. For example, while existence of data in the infusionDrug table confirms a patient received a continuous infusion, existence of the same data in this table only indicates that the infusion was *ordered* for the patient. Most orders are fulfilled, but not all. Furthermore, many orders are done *pro re nata*, or PRN, which means \"when needed\". Administration of these orders is difficult to quantify.\n",
    "\n",
    "In the US, all orders must be reviewed by a pharmacist. The majority of hospitals have an HL7 medication interface system in place which automatically synchronizes the orders with eCareManager (the source of this database) as they are verified by the pharmacist in the source pharmacy system. For hospitals without a medication interface, the eICU staff may enter a selection of medications to facilitate population management and completeness for reporting purposes."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/alistairewj/.local/lib/python3.5/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use \"pip install psycopg2-binary\" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.\n",
      "  \"\"\")\n"
     ]
    }
   ],
   "source": [
    "# Import libraries\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "import psycopg2\n",
    "import getpass\n",
    "import pdvega\n",
    "\n",
    "# for configuring connection \n",
    "from configobj import ConfigObj\n",
    "import os\n",
    "\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Database: eicu\n",
      "Username: alistairewj\n"
     ]
    }
   ],
   "source": [
    "# Create a database connection using settings from config file\n",
    "config='../db/config.ini'\n",
    "\n",
    "# connection info\n",
    "conn_info = dict()\n",
    "if os.path.isfile(config):\n",
    "    config = ConfigObj(config)\n",
    "    conn_info[\"sqluser\"] = config['username']\n",
    "    conn_info[\"sqlpass\"] = config['password']\n",
    "    conn_info[\"sqlhost\"] = config['host']\n",
    "    conn_info[\"sqlport\"] = config['port']\n",
    "    conn_info[\"dbname\"] = config['dbname']\n",
    "    conn_info[\"schema_name\"] = config['schema_name']\n",
    "else:\n",
    "    conn_info[\"sqluser\"] = 'postgres'\n",
    "    conn_info[\"sqlpass\"] = ''\n",
    "    conn_info[\"sqlhost\"] = 'localhost'\n",
    "    conn_info[\"sqlport\"] = 5432\n",
    "    conn_info[\"dbname\"] = 'eicu'\n",
    "    conn_info[\"schema_name\"] = 'public,eicu_crd'\n",
    "    \n",
    "# Connect to the eICU database\n",
    "print('Database: {}'.format(conn_info['dbname']))\n",
    "print('Username: {}'.format(conn_info[\"sqluser\"]))\n",
    "if conn_info[\"sqlpass\"] == '':\n",
    "    # try connecting without password, i.e. peer or OS authentication\n",
    "    try:\n",
    "        if (conn_info[\"sqlhost\"] == 'localhost') & (conn_info[\"sqlport\"]=='5432'):\n",
    "            con = psycopg2.connect(dbname=conn_info[\"dbname\"],\n",
    "                                   user=conn_info[\"sqluser\"])            \n",
    "        else:\n",
    "            con = psycopg2.connect(dbname=conn_info[\"dbname\"],\n",
    "                                   host=conn_info[\"sqlhost\"],\n",
    "                                   port=conn_info[\"sqlport\"],\n",
    "                                   user=conn_info[\"sqluser\"])\n",
    "    except:\n",
    "        conn_info[\"sqlpass\"] = getpass.getpass('Password: ')\n",
    "\n",
    "        con = psycopg2.connect(dbname=conn_info[\"dbname\"],\n",
    "                               host=conn_info[\"sqlhost\"],\n",
    "                               port=conn_info[\"sqlport\"],\n",
    "                               user=conn_info[\"sqluser\"],\n",
    "                               password=conn_info[\"sqlpass\"])\n",
    "query_schema = 'set search_path to ' + conn_info['schema_name'] + ';'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Examine a single patient"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "patientunitstayid = 237395"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>medicationid</th>\n",
       "      <th>patientunitstayid</th>\n",
       "      <th>drugorderyear</th>\n",
       "      <th>drugordertime24</th>\n",
       "      <th>drugordertime</th>\n",
       "      <th>drugorderoffset</th>\n",
       "      <th>drugstartyear</th>\n",
       "      <th>drugstarttime24</th>\n",
       "      <th>drugstarttime</th>\n",
       "      <th>drugstartoffset</th>\n",
       "      <th>...</th>\n",
       "      <th>drughiclseqno</th>\n",
       "      <th>dosage</th>\n",
       "      <th>routeadmin</th>\n",
       "      <th>loadingdose</th>\n",
       "      <th>prn</th>\n",
       "      <th>drugstopyear</th>\n",
       "      <th>drugstoptime24</th>\n",
       "      <th>drugstoptime</th>\n",
       "      <th>drugstopoffset</th>\n",
       "      <th>gtc</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>7461175</td>\n",
       "      <td>237395</td>\n",
       "      <td>2015</td>\n",
       "      <td>22:56:26</td>\n",
       "      <td>midnight</td>\n",
       "      <td>-12</td>\n",
       "      <td>2015</td>\n",
       "      <td>21:37:00</td>\n",
       "      <td>night</td>\n",
       "      <td>-91</td>\n",
       "      <td>...</td>\n",
       "      <td>10093.0</td>\n",
       "      <td>1,500 3</td>\n",
       "      <td>IV</td>\n",
       "      <td></td>\n",
       "      <td>No</td>\n",
       "      <td>2015</td>\n",
       "      <td>21:36:54</td>\n",
       "      <td>night</td>\n",
       "      <td>-92</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>10812193</td>\n",
       "      <td>237395</td>\n",
       "      <td>2015</td>\n",
       "      <td>22:56:26</td>\n",
       "      <td>midnight</td>\n",
       "      <td>-12</td>\n",
       "      <td>2015</td>\n",
       "      <td>21:23:00</td>\n",
       "      <td>night</td>\n",
       "      <td>-105</td>\n",
       "      <td>...</td>\n",
       "      <td>4053.0</td>\n",
       "      <td>2000 MG</td>\n",
       "      <td>IV</td>\n",
       "      <td></td>\n",
       "      <td>No</td>\n",
       "      <td>2015</td>\n",
       "      <td>23:45:00</td>\n",
       "      <td>midnight</td>\n",
       "      <td>37</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>11612134</td>\n",
       "      <td>237395</td>\n",
       "      <td>2015</td>\n",
       "      <td>22:56:26</td>\n",
       "      <td>midnight</td>\n",
       "      <td>-12</td>\n",
       "      <td>2015</td>\n",
       "      <td>22:07:00</td>\n",
       "      <td>midnight</td>\n",
       "      <td>-61</td>\n",
       "      <td>...</td>\n",
       "      <td>4034.0</td>\n",
       "      <td>420 MG</td>\n",
       "      <td>IV</td>\n",
       "      <td></td>\n",
       "      <td>No</td>\n",
       "      <td>2015</td>\n",
       "      <td>03:15:00</td>\n",
       "      <td>morning</td>\n",
       "      <td>247</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>11206166</td>\n",
       "      <td>237395</td>\n",
       "      <td>2015</td>\n",
       "      <td>22:56:26</td>\n",
       "      <td>midnight</td>\n",
       "      <td>-12</td>\n",
       "      <td>2015</td>\n",
       "      <td>21:23:00</td>\n",
       "      <td>night</td>\n",
       "      <td>-105</td>\n",
       "      <td>...</td>\n",
       "      <td>10093.0</td>\n",
       "      <td>1,500 3</td>\n",
       "      <td>IV</td>\n",
       "      <td></td>\n",
       "      <td>No</td>\n",
       "      <td>2015</td>\n",
       "      <td>02:06:00</td>\n",
       "      <td>morning</td>\n",
       "      <td>178</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>8246015</td>\n",
       "      <td>237395</td>\n",
       "      <td>2015</td>\n",
       "      <td>23:38:17</td>\n",
       "      <td>midnight</td>\n",
       "      <td>30</td>\n",
       "      <td>2015</td>\n",
       "      <td>05:00:00</td>\n",
       "      <td>morning</td>\n",
       "      <td>352</td>\n",
       "      <td>...</td>\n",
       "      <td>4053.0</td>\n",
       "      <td>2000 MG</td>\n",
       "      <td>IV</td>\n",
       "      <td></td>\n",
       "      <td>No</td>\n",
       "      <td>2015</td>\n",
       "      <td>15:45:32</td>\n",
       "      <td>evening</td>\n",
       "      <td>3877</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 23 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   medicationid  patientunitstayid  drugorderyear drugordertime24  \\\n",
       "0       7461175             237395           2015        22:56:26   \n",
       "1      10812193             237395           2015        22:56:26   \n",
       "2      11612134             237395           2015        22:56:26   \n",
       "3      11206166             237395           2015        22:56:26   \n",
       "4       8246015             237395           2015        23:38:17   \n",
       "\n",
       "  drugordertime  drugorderoffset  drugstartyear drugstarttime24 drugstarttime  \\\n",
       "0      midnight              -12           2015        21:37:00         night   \n",
       "1      midnight              -12           2015        21:23:00         night   \n",
       "2      midnight              -12           2015        22:07:00      midnight   \n",
       "3      midnight              -12           2015        21:23:00         night   \n",
       "4      midnight               30           2015        05:00:00       morning   \n",
       "\n",
       "   drugstartoffset ... drughiclseqno   dosage routeadmin  loadingdose prn  \\\n",
       "0              -91 ...       10093.0  1,500 3         IV               No   \n",
       "1             -105 ...        4053.0  2000 MG         IV               No   \n",
       "2              -61 ...        4034.0   420 MG         IV               No   \n",
       "3             -105 ...       10093.0  1,500 3         IV               No   \n",
       "4              352 ...        4053.0  2000 MG         IV               No   \n",
       "\n",
       "  drugstopyear drugstoptime24 drugstoptime  drugstopoffset gtc  \n",
       "0         2015       21:36:54        night             -92  19  \n",
       "1         2015       23:45:00     midnight              37  19  \n",
       "2         2015       03:15:00      morning             247  19  \n",
       "3         2015       02:06:00      morning             178  19  \n",
       "4         2015       15:45:32      evening            3877  19  \n",
       "\n",
       "[5 rows x 23 columns]"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "query = query_schema + \"\"\"\n",
    "select *\n",
    "from medication\n",
    "where patientunitstayid = {}\n",
    "order by drugorderoffset\n",
    "\"\"\".format(patientunitstayid)\n",
    "\n",
    "df = pd.read_sql_query(query, con)\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['medicationid', 'patientunitstayid', 'drugorderyear', 'drugordertime24',\n",
       "       'drugordertime', 'drugorderoffset', 'drugstartyear', 'drugstarttime24',\n",
       "       'drugstarttime', 'drugstartoffset', 'drugivadmixture',\n",
       "       'drugordercancelled', 'drugname', 'drughiclseqno', 'dosage',\n",
       "       'routeadmin', 'loadingdose', 'prn', 'drugstopyear', 'drugstoptime24',\n",
       "       'drugstoptime', 'drugstopoffset', 'gtc'],\n",
       "      dtype='object')"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "      <th>4</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>medicationid</th>\n",
       "      <td>7461175</td>\n",
       "      <td>10812193</td>\n",
       "      <td>11612134</td>\n",
       "      <td>11206166</td>\n",
       "      <td>8246015</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>patientunitstayid</th>\n",
       "      <td>237395</td>\n",
       "      <td>237395</td>\n",
       "      <td>237395</td>\n",
       "      <td>237395</td>\n",
       "      <td>237395</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>drugorderoffset</th>\n",
       "      <td>-12</td>\n",
       "      <td>-12</td>\n",
       "      <td>-12</td>\n",
       "      <td>-12</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>drugorderoffset</th>\n",
       "      <td>-12</td>\n",
       "      <td>-12</td>\n",
       "      <td>-12</td>\n",
       "      <td>-12</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>drugstopoffset</th>\n",
       "      <td>-92</td>\n",
       "      <td>37</td>\n",
       "      <td>247</td>\n",
       "      <td>178</td>\n",
       "      <td>3877</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>drugivadmixture</th>\n",
       "      <td>No</td>\n",
       "      <td>Yes</td>\n",
       "      <td>Yes</td>\n",
       "      <td>No</td>\n",
       "      <td>Yes</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>drugordercancelled</th>\n",
       "      <td>No</td>\n",
       "      <td>No</td>\n",
       "      <td>No</td>\n",
       "      <td>No</td>\n",
       "      <td>No</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>drugname</th>\n",
       "      <td>VANCOMYCIN 1.5 GM IN NS 250 ML IVPB (REPACKAGE)</td>\n",
       "      <td>AZTREONAM 2 G IJ SOLR</td>\n",
       "      <td>TOBRAMYCIN SULFATE 80 MG/2ML IJ SOLN</td>\n",
       "      <td>VANCOMYCIN 1.5 GM IN NS 250 ML IVPB (REPACKAGE)</td>\n",
       "      <td>AZTREONAM 2 G IJ SOLR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>drughiclseqno</th>\n",
       "      <td>10093</td>\n",
       "      <td>4053</td>\n",
       "      <td>4034</td>\n",
       "      <td>10093</td>\n",
       "      <td>4053</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>gtc</th>\n",
       "      <td>19</td>\n",
       "      <td>19</td>\n",
       "      <td>19</td>\n",
       "      <td>19</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>dosage</th>\n",
       "      <td>1,500 3</td>\n",
       "      <td>2000 MG</td>\n",
       "      <td>420 MG</td>\n",
       "      <td>1,500 3</td>\n",
       "      <td>2000 MG</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>routeadmin</th>\n",
       "      <td>IV</td>\n",
       "      <td>IV</td>\n",
       "      <td>IV</td>\n",
       "      <td>IV</td>\n",
       "      <td>IV</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>loadingdose</th>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>prn</th>\n",
       "      <td>No</td>\n",
       "      <td>No</td>\n",
       "      <td>No</td>\n",
       "      <td>No</td>\n",
       "      <td>No</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                                  0  \\\n",
       "medicationid                                                7461175   \n",
       "patientunitstayid                                            237395   \n",
       "drugorderoffset                                                 -12   \n",
       "drugorderoffset                                                 -12   \n",
       "drugstopoffset                                                  -92   \n",
       "drugivadmixture                                                  No   \n",
       "drugordercancelled                                               No   \n",
       "drugname            VANCOMYCIN 1.5 GM IN NS 250 ML IVPB (REPACKAGE)   \n",
       "drughiclseqno                                                 10093   \n",
       "gtc                                                              19   \n",
       "dosage                                                      1,500 3   \n",
       "routeadmin                                                       IV   \n",
       "loadingdose                                                           \n",
       "prn                                                              No   \n",
       "\n",
       "                                        1  \\\n",
       "medicationid                     10812193   \n",
       "patientunitstayid                  237395   \n",
       "drugorderoffset                       -12   \n",
       "drugorderoffset                       -12   \n",
       "drugstopoffset                         37   \n",
       "drugivadmixture                       Yes   \n",
       "drugordercancelled                     No   \n",
       "drugname            AZTREONAM 2 G IJ SOLR   \n",
       "drughiclseqno                        4053   \n",
       "gtc                                    19   \n",
       "dosage                            2000 MG   \n",
       "routeadmin                             IV   \n",
       "loadingdose                                 \n",
       "prn                                    No   \n",
       "\n",
       "                                                       2  \\\n",
       "medicationid                                    11612134   \n",
       "patientunitstayid                                 237395   \n",
       "drugorderoffset                                      -12   \n",
       "drugorderoffset                                      -12   \n",
       "drugstopoffset                                       247   \n",
       "drugivadmixture                                      Yes   \n",
       "drugordercancelled                                    No   \n",
       "drugname            TOBRAMYCIN SULFATE 80 MG/2ML IJ SOLN   \n",
       "drughiclseqno                                       4034   \n",
       "gtc                                                   19   \n",
       "dosage                                            420 MG   \n",
       "routeadmin                                            IV   \n",
       "loadingdose                                                \n",
       "prn                                                   No   \n",
       "\n",
       "                                                                  3  \\\n",
       "medicationid                                               11206166   \n",
       "patientunitstayid                                            237395   \n",
       "drugorderoffset                                                 -12   \n",
       "drugorderoffset                                                 -12   \n",
       "drugstopoffset                                                  178   \n",
       "drugivadmixture                                                  No   \n",
       "drugordercancelled                                               No   \n",
       "drugname            VANCOMYCIN 1.5 GM IN NS 250 ML IVPB (REPACKAGE)   \n",
       "drughiclseqno                                                 10093   \n",
       "gtc                                                              19   \n",
       "dosage                                                      1,500 3   \n",
       "routeadmin                                                       IV   \n",
       "loadingdose                                                           \n",
       "prn                                                              No   \n",
       "\n",
       "                                        4  \n",
       "medicationid                      8246015  \n",
       "patientunitstayid                  237395  \n",
       "drugorderoffset                        30  \n",
       "drugorderoffset                        30  \n",
       "drugstopoffset                       3877  \n",
       "drugivadmixture                       Yes  \n",
       "drugordercancelled                     No  \n",
       "drugname            AZTREONAM 2 G IJ SOLR  \n",
       "drughiclseqno                        4053  \n",
       "gtc                                    19  \n",
       "dosage                            2000 MG  \n",
       "routeadmin                             IV  \n",
       "loadingdose                                \n",
       "prn                                    No  "
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Look at a subset of columns\n",
    "cols = ['medicationid','patientunitstayid',\n",
    "        'drugorderoffset','drugorderoffset', 'drugstopoffset',\n",
    "        'drugivadmixture', 'drugordercancelled', 'drugname','drughiclseqno', 'gtc',\n",
    "       'dosage','routeadmin','loadingdose', 'prn']\n",
    "df[cols].head().T"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Here we can see that, roughly on ICU admission, the patient had an order for vancomycin, aztreonam, and tobramycin."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Identifying patients admitted on a single drug"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's look for patients who have an order for vancomycin using exact text matching."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "29737 unit stays with VANCOMYCIN.\n"
     ]
    }
   ],
   "source": [
    "drug = 'VANCOMYCIN'\n",
    "query = query_schema + \"\"\"\n",
    "select \n",
    "  distinct patientunitstayid\n",
    "from medication\n",
    "where drugname like '%{}%'\n",
    "\"\"\".format(drug)\n",
    "\n",
    "df_drug = pd.read_sql_query(query, con)\n",
    "print('{} unit stays with {}.'.format(df_drug.shape[0], drug))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Exact text matching is fairly weak, as there's no systematic reason to prefer upper case or lower case. Let's relax the case matching."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "41867 unit stays with VANCOMYCIN.\n"
     ]
    }
   ],
   "source": [
    "drug = 'VANCOMYCIN'\n",
    "query = query_schema + \"\"\"\n",
    "select \n",
    "  distinct patientunitstayid\n",
    "from medication\n",
    "where drugname ilike '%{}%'\n",
    "\"\"\".format(drug)\n",
    "\n",
    "df_drug = pd.read_sql_query(query, con)\n",
    "print('{} unit stays with {}.'.format(df_drug.shape[0], drug))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "HICL codes are used to group together drugs which have the same underlying ingredient (i.e. most frequently this is used to group brand name drugs with the generic name drugs). We can see above the HICL for vancomycin is 10093, so let's try grabbing that."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "9716 unit stays with HICL = 10093.\n"
     ]
    }
   ],
   "source": [
    "hicl = 10093\n",
    "query = query_schema + \"\"\"\n",
    "select \n",
    "  distinct patientunitstayid\n",
    "from medication\n",
    "where drughiclseqno = {}\n",
    "\"\"\".format(hicl)\n",
    "\n",
    "df_hicl = pd.read_sql_query(query, con)\n",
    "print('{} unit stays with HICL = {}.'.format(df_hicl.shape[0], hicl))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "No luck! I wonder what we missed? Let's go back to the original query, this time retaining HICL and the name of the drug."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>drugname</th>\n",
       "      <th>drughiclseqno</th>\n",
       "      <th>n</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>VANCOMYCIN HCL 1000 MG IV SOLR</td>\n",
       "      <td>4042.0</td>\n",
       "      <td>9661</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>vancomycin</td>\n",
       "      <td>4042.0</td>\n",
       "      <td>7826</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>VANCOmycin 1 GM in NS 250 mL IVPB</td>\n",
       "      <td>10093.0</td>\n",
       "      <td>3977</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>VANCOMYCIN HCL 10 G IV SOLR</td>\n",
       "      <td>4042.0</td>\n",
       "      <td>3891</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>VANCOMYCIN HCL</td>\n",
       "      <td>4042.0</td>\n",
       "      <td>3064</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                            drugname  drughiclseqno     n\n",
       "0     VANCOMYCIN HCL 1000 MG IV SOLR         4042.0  9661\n",
       "1                         vancomycin         4042.0  7826\n",
       "2  VANCOmycin 1 GM in NS 250 mL IVPB        10093.0  3977\n",
       "3        VANCOMYCIN HCL 10 G IV SOLR         4042.0  3891\n",
       "4                     VANCOMYCIN HCL         4042.0  3064"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "drug = 'VANCOMYCIN'\n",
    "query = query_schema + \"\"\"\n",
    "select \n",
    "  drugname, drughiclseqno, count(*) as n\n",
    "from medication\n",
    "where drugname ilike '%{}%'\n",
    "group by drugname, drughiclseqno\n",
    "order by n desc\n",
    "\"\"\".format(drug)\n",
    "\n",
    "df_drug = pd.read_sql_query(query, con)\n",
    "df_drug.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "It appears there are more than one HICL - we can group by HICL in this query to get an idea."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4042.0     333\n",
       "10093.0    206\n",
       "37442.0    119\n",
       "8466.0      53\n",
       "920.0       15\n",
       "24859.0      8\n",
       "3976.0       7\n",
       "1694.0       3\n",
       "4285.0       3\n",
       "4283.0       3\n",
       "8259.0       3\n",
       "18084.0      2\n",
       "6312.0       2\n",
       "1403.0       1\n",
       "Name: drughiclseqno, dtype: int64"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_drug['drughiclseqno'].value_counts()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Unfortunately, we can't be sure that these HICLs always identify only vancomycin. For example, let's look at drugnames for HICL = 1403."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>drugname</th>\n",
       "      <th>n</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>compounded cream</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Rx compound and Mix</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>butt butter compound</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>TESTOSTERONE 1 % (25 MG/2.5 G) TD GLPK</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>zinc/aquaphor/nystatin</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                 drugname  n\n",
       "0                        compounded cream  9\n",
       "1                     Rx compound and Mix  8\n",
       "2                    butt butter compound  7\n",
       "3  TESTOSTERONE 1 % (25 MG/2.5 G) TD GLPK  7\n",
       "4                  zinc/aquaphor/nystatin  5"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "hicl = 1403\n",
    "query = query_schema + \"\"\"\n",
    "select \n",
    "  drugname, count(*) as n\n",
    "from medication\n",
    "where drughiclseqno = {}\n",
    "group by drugname\n",
    "order by n desc\n",
    "\"\"\".format(hicl)\n",
    "\n",
    "df_hicl = pd.read_sql_query(query, con)\n",
    "df_hicl.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "This HICL seems more focused on the use of creams than on vancomycin. Let's instead inspect the top 3."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "HICL 4042\n",
      "Number of rows: 68951\n",
      "Top 5 rows by frequency:\n",
      "                         drugname     n\n",
      "0  VANCOMYCIN HCL 1000 MG IV SOLR  9661\n",
      "1                      vancomycin  7826\n",
      "2                        VANCOCIN  4613\n",
      "3     VANCOMYCIN HCL 10 G IV SOLR  3891\n",
      "4                  VANCOMYCIN HCL  3064\n",
      "\n",
      "HICL 10093\n",
      "Number of rows: 18553\n",
      "Top 5 rows by frequency:\n",
      "                                           drugname     n\n",
      "0                 VANCOmycin 1 GM in NS 250 mL IVPB  3977\n",
      "1  VANCOMYCIN 1.25 GM IN NS 250 ML IVPB (REPACKAGE)  2037\n",
      "2               VANCOmycin 1.25 GM in NS 500ML IVPB  1970\n",
      "3                VANCOmycin 1.5 GM in NS 500ML IVPB  1944\n",
      "4   VANCOMYCIN 1.5 GM IN NS 250 ML IVPB (REPACKAGE)  1475\n",
      "\n",
      "HICL 37442\n",
      "Number of rows: 3977\n",
      "Top 5 rows by frequency:\n",
      "                                          drugname     n\n",
      "0         VANCOMYCIN 1 G MINI-BAG PLUS (VIAL MATE)  1856\n",
      "1  VANCOMYCIN HCL IN DEXTROSE 750 MG/150ML IV SOLN   822\n",
      "2                        VANCOMYCIN 5gm VIAL (MDV)   525\n",
      "3                                       vancomycin   131\n",
      "4                          Vancomycin Per Pharmacy    93\n",
      "\n"
     ]
    }
   ],
   "source": [
    "for hicl in [4042, 10093, 37442]:\n",
    "    query = query_schema + \"\"\"\n",
    "    select \n",
    "      drugname, count(*) as n\n",
    "    from medication\n",
    "    where drughiclseqno = {}\n",
    "    group by drugname\n",
    "    order by n desc\n",
    "    \"\"\".format(hicl)\n",
    "\n",
    "    df_hicl = pd.read_sql_query(query, con)\n",
    "    print('HICL {}'.format(hicl))\n",
    "    print('Number of rows: {}'.format(df_hicl['n'].sum()))\n",
    "    print('Top 5 rows by frequency:')\n",
    "    print(df_hicl.head())\n",
    "    print()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "This is fairly convincing that these only refer to vancomycin. An alternative approach is to acquire the code book for HICL codes and look up vancomycin there."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Hospitals with data available"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>hospitalid</th>\n",
       "      <th>number_of_patients</th>\n",
       "      <th>number_of_patients_with_tbl</th>\n",
       "      <th>data completion</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>73</td>\n",
       "      <td>7059</td>\n",
       "      <td>6836</td>\n",
       "      <td>96.840912</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>54</th>\n",
       "      <td>167</td>\n",
       "      <td>6092</td>\n",
       "      <td>5825</td>\n",
       "      <td>95.617203</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>106</th>\n",
       "      <td>264</td>\n",
       "      <td>5237</td>\n",
       "      <td>5111</td>\n",
       "      <td>97.594042</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>184</th>\n",
       "      <td>420</td>\n",
       "      <td>4679</td>\n",
       "      <td>4618</td>\n",
       "      <td>98.696303</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>134</th>\n",
       "      <td>338</td>\n",
       "      <td>4277</td>\n",
       "      <td>4241</td>\n",
       "      <td>99.158289</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>58</th>\n",
       "      <td>176</td>\n",
       "      <td>4328</td>\n",
       "      <td>4186</td>\n",
       "      <td>96.719039</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>90</th>\n",
       "      <td>243</td>\n",
       "      <td>4243</td>\n",
       "      <td>4172</td>\n",
       "      <td>98.326656</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>71</th>\n",
       "      <td>199</td>\n",
       "      <td>4240</td>\n",
       "      <td>4116</td>\n",
       "      <td>97.075472</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>206</th>\n",
       "      <td>458</td>\n",
       "      <td>3701</td>\n",
       "      <td>3624</td>\n",
       "      <td>97.919481</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>200</th>\n",
       "      <td>443</td>\n",
       "      <td>3656</td>\n",
       "      <td>3612</td>\n",
       "      <td>98.796499</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     hospitalid  number_of_patients  number_of_patients_with_tbl  \\\n",
       "11           73                7059                         6836   \n",
       "54          167                6092                         5825   \n",
       "106         264                5237                         5111   \n",
       "184         420                4679                         4618   \n",
       "134         338                4277                         4241   \n",
       "58          176                4328                         4186   \n",
       "90          243                4243                         4172   \n",
       "71          199                4240                         4116   \n",
       "206         458                3701                         3624   \n",
       "200         443                3656                         3612   \n",
       "\n",
       "     data completion  \n",
       "11         96.840912  \n",
       "54         95.617203  \n",
       "106        97.594042  \n",
       "184        98.696303  \n",
       "134        99.158289  \n",
       "58         96.719039  \n",
       "90         98.326656  \n",
       "71         97.075472  \n",
       "206        97.919481  \n",
       "200        98.796499  "
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "query = query_schema + \"\"\"\n",
    "with t as\n",
    "(\n",
    "select distinct patientunitstayid\n",
    "from medication\n",
    ")\n",
    "select \n",
    "  pt.hospitalid\n",
    "  , count(distinct pt.patientunitstayid) as number_of_patients\n",
    "  , count(distinct t.patientunitstayid) as number_of_patients_with_tbl\n",
    "from patient pt\n",
    "left join t\n",
    "  on pt.patientunitstayid = t.patientunitstayid\n",
    "group by pt.hospitalid\n",
    "\"\"\".format(patientunitstayid)\n",
    "\n",
    "df = pd.read_sql_query(query, con)\n",
    "df['data completion'] = df['number_of_patients_with_tbl'] / df['number_of_patients'] * 100.0\n",
    "df.sort_values('number_of_patients_with_tbl', ascending=False, inplace=True)\n",
    "df.head(n=10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div class=\"vega-embed\" id=\"708b3c39-438d-490b-99cc-9ab9cec07802\"></div>\n",
       "\n",
       "<style>\n",
       ".vega-embed svg, .vega-embed canvas {\n",
       "  border: 1px dotted gray;\n",
       "}\n",
       "\n",
       ".vega-embed .vega-actions a {\n",
       "  margin-right: 6px;\n",
       "}\n",
       "</style>\n"
      ]
     },
     "metadata": {
      "jupyter-vega3": "#708b3c39-438d-490b-99cc-9ab9cec07802"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "var spec = {\"$schema\": \"https://vega.github.io/schema/vega-lite/v2.json\", \"mark\": \"bar\", \"encoding\": {\"y\": {\"aggregate\": \"count\", \"type\": \"quantitative\", \"stack\": null}, \"color\": {\"type\": \"nominal\", \"field\": \"Number of hospitals\"}, \"x\": {\"type\": \"quantitative\", \"field\": \"Percent of patients with data\", \"bin\": {\"maxbins\": 10}}}, \"width\": 450, \"data\": {\"values\": [{\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 96.84091231052557}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 95.6172028890348}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 97.5940423906817}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 98.69630262876683}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.15828851999065}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 96.71903881700554}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 98.32665566815932}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 97.0754716981132}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 97.91948122129153}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 98.7964989059081}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 98.34116671274536}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.43636902996144}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 96.62626924336718}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 91.93497968115037}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 98.6399183951037}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 97.15376605345367}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 92.44745279657998}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.28881864875542}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 98.83865615927002}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.85781990521328}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 98.17330210772833}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.52312827849309}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 98.84504331087585}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 96.1169702780441}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 95.17208413001912}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 97.14285714285714}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 94.00693412580485}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 98.70480302212628}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 95.36}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 98.54096520763187}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.20364050056882}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 98.22552947910704}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 92.99014238773275}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.70202622169249}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 91.45534729878722}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.62406015037594}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.42602040816327}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 95.6575682382134}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 98.96238651102465}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.86225895316805}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 37.350735906692584}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.70104633781763}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.77151561309977}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.057344854674}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 98.89328063241106}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 95.51430781129156}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 94.9919224555735}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 98.29642248722317}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.2132867132867}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.81949458483754}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.81684981684981}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 98.87535145267104}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 97.91469194312796}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.80449657869013}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 98.98167006109979}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 95.90818363273453}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 93.92752203721841}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.78880675818374}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.56896551724138}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 25.041095890410958}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.88950276243094}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.88558352402745}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.63855421686748}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 98.90377588306943}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 92.62295081967213}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 98.42105263157895}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 86.85446009389672}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.0578734858681}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.86225895316805}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.44979367262724}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.85955056179775}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.71223021582733}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 91.97786998616874}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 94.94219653179191}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.69604863221885}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 90.10043041606886}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 97.80907668231612}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.52}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 100.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.32432432432432}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 100.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 100.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 98.63481228668942}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.82547993019197}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.82363315696648}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 94.39728353140917}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 94.93006993006993}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 98.35766423357664}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 100.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 98.09523809523809}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.59514170040485}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 100.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 94.95967741935483}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 93.7246963562753}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.56896551724138}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 92.13973799126637}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 100.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 100.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.47229551451187}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 95.76719576719577}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.72222222222223}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 100.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.71751412429379}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 98.59550561797754}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 97.99426934097421}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 88.71391076115486}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 100.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 100.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 85.22427440633246}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.37106918238993}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 100.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 92.3076923076923}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.00662251655629}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 89.7196261682243}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 98.828125}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 96.86274509803921}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.14163090128756}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 77.97202797202797}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.54954954954955}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 93.56223175965665}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.53917050691244}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 100.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 86.12244897959184}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 98.44559585492227}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 29.712460063897762}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 96.61016949152543}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 100.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 67.61133603238866}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 95.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 99.33774834437085}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 98.52941176470588}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 18.970588235294116}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 96.18320610687023}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 96.18320610687023}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 100.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 100.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 95.06172839506173}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 100.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 92.85714285714286}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 95.45454545454545}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 98.36065573770492}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 96.42857142857143}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 96.22641509433963}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 97.72727272727273}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 100.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 96.96969696969697}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 100.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 3.2214765100671143}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 100.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 100.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 100.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 100.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 28.78787878787879}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 100.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 2.170767004341534}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 100.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 93.33333333333333}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 80.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 100.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 20.37037037037037}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 4.545454545454546}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 69.23076923076923}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 100.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 2.525252525252525}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 1.4450867052023122}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.5361930294906166}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 3.225806451612903}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 1.8018018018018018}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.1610305958132045}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.4761904761904762}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.10298661174047373}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 1.6129032258064515}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.39215686274509803}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.2188183807439825}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}, {\"Number of hospitals\": \"data completion\", \"Percent of patients with data\": 0.0}]}, \"selection\": {\"grid\": {\"type\": \"interval\", \"bind\": \"scales\"}}, \"height\": 300};\n",
       "var selector = \"#708b3c39-438d-490b-99cc-9ab9cec07802\";\n",
       "var type = \"vega-lite\";\n",
       "\n",
       "var output_area = this;\n",
       "require(['nbextensions/jupyter-vega3/index'], function(vega) {\n",
       "  vega.render(selector, spec, type, output_area);\n",
       "}, function (err) {\n",
       "  if (err.requireType !== 'scripterror') {\n",
       "    throw(err);\n",
       "  }\n",
       "});\n"
      ]
     },
     "metadata": {
      "jupyter-vega3": "#708b3c39-438d-490b-99cc-9ab9cec07802"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAngAAAFfCAYAAADd1rEpAAAgAElEQVR4Xu2dCZhlR123X0H2HSIYQQk2e0AMMCaEsEQTwzKAoCOgIGvIAhJQIKMfkBBApzEoCUvAIZFFJMLHIiTIkrBIFCQIhCXERDCGJeyEBIRAoL/nB3X5Lp3unj7dd6lT5z3PM8/MdN9zzr/ef/W9b/+r6tTP4SEBCUhAAhKQgAQk0BSBn2uqNTZGAhKQgAQkIAEJSAAFz04gAQlIQAISkIAEGiOg4DWWUJsjAQlIQAISkIAEFDz7gAQkIAEJSEACEmiMgILXWEJtjgQkIAEJSEACElDw7AMSkIAEJCABCUigMQLzFLwHAa8EtgDnFK7XBl4H3Az4FPAQ4PvAscABwGXAYcCZjeXB5khAAhKQgAQkIIGJEZiX4N0FOBi4OfC4McF7HnAh8DfAs4C3A1cCjgS2AnsCJwJ7T4yAF5KABCQgAQlIQAKNEZiX4F0D+A5wGvCEMcH7JLAvcPEY56OBC4CTytfOBvZZ9prG0mJzJCABCUhAAhKQwMYJzEvwRhEvF7zzgZeV4dgM2z4ZOA44BTi1nJRzDgfO3XizPVMCEpCABCQgAQm0S6A2wbsEuA/wfuCFwKeB2y8TvNOBQ4HzFhcXj1paWkqF76fHbrvt9r3999//qu2mzJZJQAISkIAE1iRw/sLCQuayewyYQG2Cdx5wa+CHwP2AewFfLvPydpY8pbKXhRmRwcsdO3bsWNq+ffu82zXgLmXTJSABCUhgngQ+85nPLC0sLEziczCLG98FfBS4E7AE3LksdMzn8Icn0M6Myl2zTL2awOXWvEQWbr4E+FZZzDl68X6lsHTvMvd/mnFksWgWjm4HdgP+ADh+FzccP2fdsU2iA6z7Ziu8cPkQ7YuAdwJvAXYAnysd6xjgQGCvAiLJWPFQ8DaTDs+VgAQkIIG+E5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2pvXrcQkVc3xxQPjgpf4wiTCdH4RmbDMUHQqR+GUVcDjR8QpwhOZSWUpw8KZe5cj1bbMPxvdLxWycWbj8UacVxK8XCdVwAh8hqXDIjFF8LJIJUPBmd8Xnok9gpe8v7xUwCJumSe3Er/xFbarDdGGceYIZrg0w/Sp6qb6uxnBSxU0spwqc6qFowpt+l/6yymlWplpBZFmh2gbf3OzeRLoQkDB60LL1/aBwFqCl8rYaEFBJtXngzvitdIqzUhCKnA3K3OfIigZtswHaSo9mUP20TK3LmKzWgUvc9xSOcxChAhH5tyNjkzIT1Us8+hSJcw1IgkZJt6V4L2+zIlLtS4f8JGgOwL/t0hOxCbVssznS8UyQ5ejGDLUNxK8DDOvxGStCl6qg5nIH1GL5P1uGbaNzHy6DDVGTMaPW5fvRVRS/RoNdaYCFWEcv18EZpzZeLxrCV6GOyNyyXPEOgIZ/pHOUwufDJ9G8MZlvwAAATJJREFUIFMxS07DOl/L8G7aksUrkcRxfpnPmWHj0ZF8ZxFNhmNTtUyskdfMs8wcy4j7PyzrE8v72LikrlbBy2vyy0N+mQjbtCG/kOSXhEw5iJDmUTCZ65fXpf2p/qXKnDhcZNGHdyxjlMCUCCh4UwLrZSUwRQLjQjDF23jpVQhEviPreUxKbUOgtywymqH58bmDJlMCEhgYAQVvYAm3uU0QUPDmm8ZUCDO/MRW2Q+cbyuXungppVohntbIPOq4sOYYjgVkSUPBmSdt7SUACEpCABCQggRkQUPBmANlbSEACEpCABCQggVkSUPBmSdt7SUACEpCABCQggRkQUPBmANlbSEACEpCABCQggVkSUPBmSdt7SUACEpCABCQggRkQUPBmANlbSEACEpCABCQggVkS+H/j7ICMDu/WswAAAABJRU5ErkJggg=="
     },
     "metadata": {
      "jupyter-vega3": "#708b3c39-438d-490b-99cc-9ab9cec07802"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "df[['data completion']].vgplot.hist(bins=10,\n",
    "                                    var_name='Number of hospitals',\n",
    "                                    value_name='Percent of patients with data')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Here we can see there are a few hospitals with no interface, and thus 0 patients, though the majority have >90% data completion."
   ]
  }
 ],
 "metadata": {
  "front-matter": {
   "date": "2015-09-01",
   "linktitle": "admissiondrug",
   "title": "admissiondrug"
  },
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
